package com.easy.service.impl;

import com.easy.bean.Productinfo;
import com.easy.dao.ProductinfoDao;
import com.easy.service.IProductinfo;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class ProductinfoService implements IProductinfo {

    @Autowired
    ProductinfoDao productinfoDao;


    @Override
    public int add(Productinfo productinfo) {
        return productinfoDao.add(productinfo);
    }

    @Override
    public int edit(Productinfo productinfo) {
        return productinfoDao.edit(productinfo);
    }

    @Override
    public int delete(int productinfoid) {
        return productinfoDao.delete(productinfoid);
    }

    @Override
    public List<Productinfo> getList(Page page, String text) {
        return productinfoDao.getList(page, text);
    }

    @Override
    public Productinfo getProductinfoById(int productinfoid) {
        return productinfoDao.getProductinfoById(productinfoid);
    }

    @Override
    public int getCount(String text) {
        return productinfoDao.getCount(text);
    }
}
